﻿@using EC.Entity.Response.PaymentRecord
@using EC.Entity.Enum

@model EC.Entity.PagedList<PaymentRecordQueryResponse>
<div class="data-body data-scroll">
    <div class="data-view">
        <div class="data-div-view table-responsive">
            <table class="table table-hover table-striped table-bordered">
                <thead>
                    <tr>
                        <th class="t_l">商户名称</th>
                        <th class="t_l wd150">商户订单号</th>
                        <th class="t_l wd75">代付金额</th>
                        <th class="t_l wd75">手续费</th>
                        <th class="t_l">银行名称</th>
                        <th class="t_l" width="150">银行卡号</th>
                        <th class="t_l">开户名</th>
                        <th class="t_l" width="130">申请时间</th>
                        <th class="t_l" width="130">付款时间</th>
                        <th class="t_l">操作人</th>
                        <th class="t_l">付款状态</th>
                        <th class="t_l wd75">转账手续费</th>
                        <th class="t_l">通知状态</th>
                        <th width="110">操作</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null && Model.TData != null && Model.TData.Any())
                    {
                        foreach (var item in (IEnumerable<PaymentRecordQueryResponse>)Model.TData)
                        {
                    <tr>
                        <td class="t_l">@(item.MerchantName)</td>
                        <td class="t_l wd150">@(item.MerchantOrderNo)</td>
                        <td class="t_r wd75">@(item.WithdrawalAmount)</td>
                        <td class="t_r wd75">@(item.WithdrawalFee)</td>
                        <td class="t_l">@(item.WithdrawalBankName)</td>
                        <td class="t_l" width="150">@(item.WithdrawalCardNumber)</td>
                        <td class="t_l">@(item.WithdrawalCardName)</td>
                        <td class="t_l" width="130">@(item.CreatedDate.ToString("yyyy-MM-dd HH:mm:ss"))</td>
                        <td class="t_l" width="130">@(string.Format("{0:yyyy-MM-dd HH:mm:ss}", item.PaymentDate))</td>
                        <td class="t_l">@(item.CreatedBy)</td>
                        <td class="t_l">
                            @switch (item.PaymentStatus)
                            {
                                case 1:
                                    <span class="bold" style=font-weight: bold>未付款</span>
                                    break;
                                case 2:
                                    <span class="bold" style=color:#3e8f3e>付款成功</span>
                                    break;
                                case 3:
                                    <span class="bold" style=color:#FF0000>付款失败</span>
                                    break;
                                case 4:
                                    <span class="bold" style=font-weight: bold>付款中</span>
                                    break;
                                case 5:
                                    <span class="bold" style=font-weight: bold>取消付款</span>
                                    break;
                                default:
                                    break;
                            }
                        </td>
                        <td class="t_r wd75">@(item.TransferFee)</td>
                        <td class="t_l">
                            @switch (item.NoticeStatus)
                            {
                                case 1:
                                    <span class="bold">未通知</span>
                                    break;
                                case 2:
                                    <span class="bold green">通知成功</span>
                                    break;
                                case 3:
                                    <span class="bold red">通知失败</span>
                                    break;
                                case 4:
                                    <span class="bold orange ">通知中</span>
                                    break;
                                case 5:
                                    <span class="bold">不通知</span>
                                    break;
                                default:
                                    break;
                            }
                        </td>
                        <td width="110">
                            @if (item.Id == (sbyte)LabelStatus.启用)
                            {
                                <a class="btn btn-danger btn-xs" data-confirm="确定要禁用该权限？" data-succesFun="doSearch" data-href="/Label/UpdateStatus?id=@(item.Id)&status=@((sbyte)LabelStatus.禁用)">禁用</a>
                            }
                            else
                            {
                                <a class="btn btn-primary btn-xs" data-confirm="确定要启用该权限？" data-succesFun="doSearch" data-href="/Label/UpdateStatus?id=@(item.Id)&status=@((sbyte)LabelStatus.启用)">启用</a>
                            }
                            <button type="button" class="btn btn-default btn-xs" data-modal="/Label/AddOrEdit/@(item.Id)" data-title="编辑" data-width="452" data-height="250">
                                <span class="glyphicon glyphicon-edit"></span> 编辑
                            </button>
                        </td>
                    </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="14" class="t_c">暂无记录</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 必要的分页参数设置 -->
<input type="hidden" id="TotalCount" value="@(Model != null ? Model.TotalCount : 0)" />